/*------------------------------------------------------------------------
|                            FILE DESCRIPTION                            |
------------------------------------------------------------------------*/
/*------------------------------------------------------------------------
|  - File name     : os_config.h
|  - Author        : zeweni
|  - Update date   : 2021.05.07
|  - Copyright(C)  : 2021-2021 zeweni. All rights reserved.
------------------------------------------------------------------------*/
/*------------------------------------------------------------------------
|                            COPYRIGHT NOTICE                            |
------------------------------------------------------------------------*/
/*
 * Copyright (C) 2021, zeweni (17870070675@163.com)

 * This file is part of Ant Real Time Operating System.

 * Ant Real Time Operating System is free software: you can redistribute 
 * it and/or modify it under the terms of the Apache-2.0 License.

 * Ant Real Time Operating System is distributed in the hope that it will 
 * be useful,but WITHOUT ANY WARRANTY; without even the implied warranty 
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 * Apache-2.0 License License for more details.

 * You should have received a copy of the Apache-2.0 License.Ant Real Time
 * Operating System. If not, see <http://www.apache.org/licenses/>.
**/

/*------------------------------------------------------------------------
|                                CONFIG                                  |
------------------------------------------------------------------------*/
#ifndef __OS_CONFIG_H_
#define __OS_CONFIG_H_


/**
 * @brief   内核堆栈大小，最大允许255个字节，线程堆栈不可以超过这个大小。
 * @details The kernel stack size, the maximum allowed is 255 bytes.
 *          The thread stack cannot exceed this size.
**/
#define    OS_KERNEL_STK_SIZE   (128)

/**
 * @brief   空闲线程堆栈大小，最大允许OS_KERNEL_STK_SIZE个字节。
 * @details The idle thread stack size, the maximum allowable 
 *          OS_KERNEL_STK_SIZE bytes.
**/
#define    OS_IDLE_THREAD_STK_SIZE   (OS_KERNEL_STK_SIZE)


/**
 * @brief   系统内存池的大小，最大不能超过XRAM的大小。
 * @details The size of the system memory pool, 
 *          the maximum cannot exceed the size of XRAM.
 * @note    内存池的最小单位是内存块，内存块有信息+内存组成，其中信息头占用8个字节。
 *          假设你申请了10个字节的内存，实际上占用的是18个字节，切记。
 *          The smallest unit of the memory pool is a memory block, 
 *          which consists of a message header + memory, 
 *          and the message header occupies 5 bytes.
 *          Suppose you have applied for 10 bytes of memory, 
 *          which actually occupies 15 bytes, remember.
**/
#define    OS_MEM_POOL_SIZE   (256*4)


/**
 * @brief   线程数量，最大可以创建31个，如果开启了软件定时器，只有30个。
 * @details The number of threads can be up to 31. 
 *          If the software timer is enabled, there are only 30.
**/
#define    OS_THREAD_MAX_NUM    (8)


/**
 * @brief   软件定时器开关，写1打开，写0关闭。
 * @details Software timer switch, write 1 to open, write 0 to close.
**/
#define    OS_SOFT_TIMER_CTRL    (0)


/*------------------------------------------------------------------------
|                    END OF FLIE.  (C) COPYRIGHT zeweni                  |
------------------------------------------------------------------------*/

#endif